<%-- 
  - Author: Jordi Vilaplana Mayoral <jvilaplana@alumnes.udl.cat>
  - Date: 05/04/2011
  - 
  - LocationManager
  - Copyright (C) 2011 Jordi Vilaplana Mayoral
  -
  - This program is free software: you can redistribute it and/or modify
  - it under the terms of the GNU General Public License as published by
  - the Free Software Foundation, either version 3 of the License, or
  - (at your option) any later version.
  -
  - This program is distributed in the hope that it will be useful,
  - but WITHOUT ANY WARRANTY; without even the implied warranty of
  - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  - GNU General Public License for more details.
  -
  - You should have received a copy of the GNU General Public License
  - along with this program.  If not, see <http://www.gnu.org/licenses/>.
  - 
  - @(#)
  - Description: This program allows users to book rooms and schedule activities
  --%>

<%@ page pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<h2>Alta d'espais</h2>

<c:choose>
  <c:when test="${requestScope.success == true}">
    <p class="info" id="newLocSuccess" onclick="$('newLocSuccess').hide();">Espai inserit correctament.</p>
  </c:when>
</c:choose>

<form action="NewLocation" class="newLoc" method="post">
  <label for="publicName">Nom públic:</label>
  <input autofocus id="publicName" name="publicName" placeholder="Nom de l'espai" type="text" required="required" />
  <br /><br />
  <label for="roomTypeId">Tipus:</label>
  <select id="roomTypeId" name="roomTypeId">
    <c:forEach var="roomType" items="${requestScope.roomTypes}">
      <option value="${roomType.roomTypeId}">
        <c:out value="${roomType.typeName}" />
      </option>
    </c:forEach>
  </select>
  <br /><br />
  <label for="capacity">Capacitat:</label>
  <input id="capacity" name="capacity" type="number" min="0" max="999" step="10" value="20" />
  <br /><br />
  <input class="newLocation" type="submit" value="Crear espai" />
</form>